package day1027.CarRentalCompany;

import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        AutomobileBusiness automobileBusiness = new AutomobileBusiness();
        automobileBusiness.chushihua();
        System.out.println("当前有"+automobileBusiness.pos+"辆车可以租赁");
        System.out.println("——————————大发租车行欢迎您——————————");
        for (;;){
            System.out.println("*************************************************************************");
            System.out.println("1.查看车辆情况  2.租赁  3.还车  4.报废   5.采购新车  6.查看租赁记录  9.退出系统");
            System.out.println("*************************************************************************");
            System.out.println("请选择：");
            int choice = input.nextInt();
            if (choice==1){
                automobileBusiness.check();
            }
            if (choice==2){
               automobileBusiness.lease();
            }
            if (choice==3){
                System.out.println("请输入要还的车的车牌号");
                automobileBusiness.returncar(input.next());
            }
            if (choice==4){
                System.out.println("请输入要报废汽车的车牌号：");
                automobileBusiness.scrap(input.next());
            }
            if (choice==5){
                automobileBusiness.add();
            }
            if(choice==6){
                automobileBusiness.carshow();
            }
            if (choice==9){
                System.out.println("欢迎下次光临");
                break;
            }
        }
    }
}
